package com.maisuiit.basics;

import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * @Description:
 * @Author: zhangcc
 * @CreateTime: 2022-10-25
 */
public class IOTest4 {
    public static void main(String []args){
        try{
            //输入流，从键盘接收数
            InputStreamReader isr=new InputStreamReader(System.in);
            BufferedReader br=new BufferedReader(isr);
            //给出提示
            System.out.println("请输入0至100的数：");
            //从控制台读取一行数据
            String a1=br.readLine();
            //把String转为int
            int a=Integer.decode(a1);
            if (a<=100 && a>=90){System.out.println("优");}
            else if (a<90 && a>=80){System.out.println("良");}
            else if (a<80 && a>=70){System.out.println("中");}
            else if (a<70 && a>=60){System.out.println("及格");}
            else if (a<60 && a>=0){System.out.println("不及格");}
            else {System.out.println("input error");}
        }catch(Exception e){
            e.printStackTrace();
        }
    }
}
